package com.backend.icpc.controller;
import lombok.Data;
@Data
public class Team implements Comparable{
    private int is_form;
    private int is_star;
    private int is_concerned;
    private String sname;
    private String tname;
    private int rank;
    private boolean is_acA;
    private int scA;
    private boolean is_acB;
    private int scB;
    private boolean is_acC;
    private int scC;
    private boolean is_acD;
    private int scD;
    private int ac_cnt;
    private int fashi;

    public Team()
    {
        this.sname = "";
        this.tname = "";
        this.ac_cnt = 0;
        this.is_acB = false;
        this.is_acA = false;
        this.is_acC = false;
        this.is_acD = false;
        this.scA = -1;
        this.scB = -1;
        this.scC = -1;
        this.scD = -1;
        this.rank = 0;
        this.fashi = 0;
        this.is_form = 0;
        this.is_star = 0;
        this.is_concerned = 0;
    }
    @Override
    public int compareTo(Object o) {
        Team s = (Team) o;
        if(this.ac_cnt > s.ac_cnt)
        {
            return -1;
        }
        else if(this.ac_cnt == s.ac_cnt)
        {
            if(this.fashi > s.fashi) {
                return 1;
            }
            else{
                return -1;
            }
        }
        else
        {
            return 1;
        }
    }
}
